package com.spring.spring_ioc_di.component;

import com.spring.spring_ioc_di.model.UserInfo;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;

@Component
public class UserComponent {
    //    @Qualifier("userInfo2")
//    @Autowired
//    private UserInfo ui;

    @Resource(name = "userInfo")
    private UserInfo ui;

    public void say(){
        System.out.println("UserComponent say...");
        System.out.println(ui);
    }
}
